#include "../headers/Main.h"

//Get Player Ship:
wstring GetShipName(unsigned int iShipID)
{
	Archetype::Ship *ship = Archetype::GetShip(iShipID);
	if(ship->iIDSName)
	{
		wstring wscShip = HkGetWStringFromIDS(ship->iIDSName);
		return wscShip;
	} else {
		return L"N/A";
	}
}

//Get Player Base:
wstring GetBaseName(unsigned int iBaseID)
{
	if (iBaseID == NULL){
		return L"N/A";
	} else {
		return HkGetWStringFromIDS(Universe::get_base(iBaseID)->iBaseIDS);
	}
}

//Get Player System name
wstring GetSystemName(unsigned int iSystemID)
{
	unsigned int iNameIDS; 
	wstring wscSystemName;

	pub::System::GetName(iSystemID, iNameIDS); 
	wscSystemName = HkGetWStringFromIDS(iNameIDS);
	if (wscSystemName == L""){
		return L"N/A";
	} else {
		return wscSystemName;
	}
}

//Get Player Group name
wstring GetGroupName(unsigned int iGroupID)
{
	/* // I don't know how to do this, It's hard for me right now.
	unsigned int iNameIDS;
	wstring wscGroupName, temp;
	pub::Reputation::GetGroupName(iGroupID, iNameIDS); 

	wscGroupName = HkGetWStringFromIDS(iNameIDS);
	if (wscGroupName == L""){
		return L"Freeman";
	} else {
		return wscGroupName;
	}*/
	return L"Freeman";
}

//Get Full Name
wstring GetPlayerName(unsigned int iClientID)
{
	HKPLAYERINFO pi;
	HkGetPlayerInfo(ARG_CLIENTID(iClientID), pi, false);
	return pi.wscCharname.c_str();
}